#include "common.hpp"

int main() 
{
    mkfifo(PipeName.c_str(), 0666);

    int fd = open(PipeName.c_str(), O_WRONLY);
    string command;

    while (true) 
	{
        cout<<"add / delete / query / exit"<<endl;
        cout<<"Please Enter@ ";
        cin >> command;

        write(fd, command.c_str(), command.size() + 1);

        if (command == "exit") 
		{
            close(fd);
            break;
        }
    }

    return 0;
}